{extend name="base" /}
{block name="js"}
<script src="__INDEX__/users/users.js?v={$v}" type="text/javascript"></script>
{/block}
{block name="main"}
<div class="l-loading" style="display: block" id="htr-loading"></div>
<form id="userForm" autocomplete="off" >
<table class='htr-form htr-box-top'>
       <tr>
          <th>姓名<font color='red'>*</font>：</th>
          <td>
            <input type="text" class="ipt" id="user_name" name="user_name" value="{$data['user_name']}" />
          </td>
          <th>姓别<font color='red'> </font>：</th>
          <td>
            <select id="user_sex" name='user_sex' class='ipt'>
              <option value="0"{if $data['user_sex']==0} selected{/if}>保密</option>
              <option value="1"{if $data['user_sex']==1} selected{/if}>男</option>
              <option value="2"{if $data['user_sex']==2} selected{/if}>女</option>
            </select>   
          </td>
          <th>指导老师<font color='red'> </font>：</th>
          <td>
            <input type="text" class="ipt" id="user_teacher" name="user_teacher" value="{$data['user_teacher']}" />
          </td>
       </tr>
       <tr>
          <th>联系方式<font color='red'>*</font>：</th>
          <td>
            <input type="text" class="ipt" id="user_phone" name="user_phone" value="{$data['user_phone']}" />
          </td>
          <th>出生年月<font color='red'> </font>：</th>
          <td>
            <input type="text" class="ipt" id="user_birthday" name="user_birthday" value="{$data['user_birthday']}" />
          </td>
          <th>服务人员<font color='red'>*</font>：</th>
          <td>
            <select id="staffId" class='ipt'>
              <option value="0">-请选择-</option>
              {volist name="staffList" id="vo"}
              <option value="{$key}"{if $data['staffId']==$key} selected{/if}>{$vo}</option>
              {/volist}
            </select>
          </td>
       </tr>
       <tr>
          <th>年龄<font color='red'> </font>：</th>
          <td>
            <input type="text" class="ipt" id="user_age" name="user_age" value="{$data['user_age']}" />
          </td>
          <th>初次消费金额<font color='red'> </font>：</th>
          <td>
            <input type="text" class="ipt" id="first_consume" name="first_consume" value="{$data['first_consume']}" />
          </td>
          <th>客户分类<font color='red'> </font>：</th>
          <td>
            <select id="classifyId" name='classifyId' class='ipt'>
              <option value="">-请选择-</option>    
              {volist name="classifyList" id="vo"}
              <option value="{$vo['classifyId']}"{if $data['classifyId']==$vo['classifyId']} selected{/if}>{$vo['classifyName']}</option>
              {/volist}
            </select> 
          </td>
       </tr>
       <tr>
          <th>兴趣爱好<font color='red'> </font>：</th>
          <td colspan='3'> 
            {volist name="interestList" id="vo"}
            <label><input type="checkbox" class="ipt" name="interestId"<?php echo in_array($vo['interestId'],explode(',',$data['interestId'])) ? ' checked' : ''?> value="{$vo['interestId']}" />{$vo['interestName']}</label>
            {/volist}
            <input type="text" class="ipt" id="interest_text" name="interest_text" value="{$data['interest_text']}" />
          </td>
          <th>客户类型<font color='red'> </font>：</th>
          <td>
            <label><input type="radio" class="ipt" id="type0" name="type" <?=($data['type']==0)?'checked':'';?> value="0" />客户转介绍</label>
            <label><input type="radio" class="ipt" id="type1" name="type" <?=($data['type']==1)?'checked':'';?> value="1" />业务扁平开发</label>
          </td>
       </tr>
       <tr>
          <th>所属地区<font color='red'>*</font>：</th>
          <td colspan='3'>            
            <select id="area_0" class='ipt j-areas' level="0" onchange="HTR.ITAreas({id:'area_0',val:this.value,isRequire:true,className:'j-areas'});">
              <option value="">-请选择-</option>
              {volist name="areaList" id="vo"}
              <option value="{$vo['areaId']}">{$vo['areaName']}</option>
              {/volist}
           </select>
          </td>
          <th>详细地址<font color='red'>*</font>：</th>
          <td>
            <input type="text" class="ipt" id="user_address" name="user_address" value="{$data['user_address']}" />
          </td>
       </tr>
       <tr>
          <th>疾病类型<font color='red'> </font>：</th>
          <td colspan='5'> 
            {volist name="diseaseList" id="vo"}
            <label><input type="checkbox" class="ipt" name="diseaseId"<?php echo in_array($vo['diseaseId'],explode(',',$data['diseaseId'])) ? ' checked' : ''?> value="{$vo['diseaseId']}" />{$vo['diseaseName']}</label>
            {/volist}
            <input type="text" class="ipt" id="disease_text" name="disease_text" value="{$data['disease_text']}" />
          </td>
       </tr>
       <tr>
          <th>客户消费类型<font color='red'> </font>：</th>
          <td colspan='3'>
            <label><input type="checkbox" class="ipt" name="consume_type"<?php echo in_array(0,explode(',',$data['consume_type'])) ? ' checked' : ''?> value="0" />系统性</label>
            <label><input type="checkbox" class="ipt" name="consume_type"<?php echo in_array(1,explode(',',$data['consume_type'])) ? ' checked' : ''?> value="1" />传统型</label>
            <label><input type="checkbox" class="ipt" name="consume_type"<?php echo in_array(2,explode(',',$data['consume_type'])) ? ' checked' : ''?> value="2" />投资型</label>
          </td>
          <th>退休单位<font color='red'> </font>：</th>
          <td>
            <input type="text" class="ipt" id="retirement_unit" name="retirement_unit" value="{$data['retirement_unit']}" />
          </td>
        </tr>
        <tr>
          <th>备注<font color='red'> </font>：</th>
          <td colspan='5'>
            <textarea style="width:600px;height:50px;" class="ipt" id="remark" name="remark">{$data['remark']}</textarea>
          </td>
       </tr>
  <tr>
     <td colspan='6' align='center'>
       <input type="hidden" name="id" id="user_id" class="ipt" value="<?=(int)$data['user_id']?>" />
       <input type="submit" value="提交" class='btn btn-blue' />
       <input type="button" onclick="javascript:history.go(-1)" class='btn' value="返回" />
     </td>
  </tr>
</table>
</form>
<script>
$(function(){editInit({
    areaId:'{$data["areaId"]}',areaIdPath:'{$data["areaIdPath"]}'
  })});
</script>
{/block}

